import httpRequest from '@/request'
import appConfig from '@/config/index'

// 固件列表
export function firmwareList (params: any) {
  return httpRequest({
    url: `${appConfig.api}firmware/list`,
    method: 'post',
    data: params
  })
}

// 新增固件
export function firmwareInsert (params: any) {
  return httpRequest({
    url: `${appConfig.api}firmware/add`,
    method: 'post',
    data: params,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}

// 编辑固件
export function firmwareUpdate (params: any) {
  return httpRequest({
    url: `${appConfig.api}firmware/update`,
    method: 'post',
    data: params,
    // headers: {
    //   'Content-Type': 'multipart/form-data'
    // }
  })
}

// 删除固件
export function firmwareDelete (params: any) {
  return httpRequest({
    url: `${appConfig.api}firmware/delete`,
    method: 'post',
    data: params
  })
}
